let service = require('gulp-koa')


module.exports = (gulp, $, ispod) => {
    gulp.task('run:server', (cb) => {
        // Starts a server
        gulp.src('./src/gulp/*/*.js')
            .pipe(service('./src/gulp/back/tests.js', { env: { NODE_ENV: 'development', DEBUG: '*' } }))
        cb()

    })
    gulp.task('stop:server', () => {
        // Stops a server (by pid)
        service.stop('./src/gulp/back/tests.js')
        cb()
    })
}
